import 'package:app_30/models/load_entity.dart';

loadEntityFromJson(LoadEntity data, Map<String, dynamic> json) {
  if (json['user'] != null) {
    data.user = json['user'].toString();
  }

  if (json['id'] != null) {
    data.id = json['id'].toString();
  }

  if (json['vip'] != null) {
    data.vip = json['vip'].toString();
  }

  if (json['jine'] != null) {
    data.jine = json['jine'].toString();
  }

  if (json['tgjifen'] != null) {
    data.tgjifen = json['tgjifen'].toString();
  }

  if (json['todayjine'] != null) {
    data.todayjine = json['todayjine'].toString();
  }

  if (json['dayendtime'] != null) {
    data.dayendtime = json['dayendtime'].toString();
  }

  if (json['txzhone'] != null) {
    data.txzhone = json['txzhone'].toString();
  }

  if (json['txxmone'] != null) {
    data.txxmone = json['txxmone'].toString();
  }
  return data;
}

Map<String, dynamic> loadEntityToJson(LoadEntity entity) {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['user'] = entity.user;
  data['id'] = entity.id;
  data['vip'] = entity.vip;
  data['jine'] = entity.jine;
  data['tgjifen'] = entity.tgjifen;
  data['todayjine'] = entity.todayjine;
  data['dayendtime'] = entity.dayendtime;
  data['txzhone'] = entity.txzhone;
  data['txxmone'] = entity.txxmone;
  return data;
}
